<app-indexing-progress *ngIf="!widget"></app-indexing-progress>

<div [class.full-container]="!widget">
  <ng-container *ngIf="!error">
    <div [class]="!widget ? 'chart' : 'chart-widget'" *browserOnly [style]="{ height: widget ? ((height + 20) + 'px') : null, paddingBottom: !widget && !allowZoom ? '10px' : null}" echarts [initOpts]="chartInitOptions" [options]="chartOptions"
      (chartInit)="onChartInit($event)">
    </div>
    <div class="text-center loadingGraphs" *ngIf="isLoading">
      <div class="spinner-border text-light"></div>
    </div>
  </ng-container>
  <ng-container *ngIf="error">
    <div class="error-wrapper">
      <p class="error">{{ error }}</p>
    </div>
  </ng-container>

  <div class="text-center loadingGraphs" *ngIf="!stateService.isBrowser || isLoading">
    <div class="spinner-border text-light"></div>
  </div>
</div>
